﻿using System;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x020002B8 RID: 696
	public class TDeclareVariable : TParseTreeNode
	{
		// Token: 0x06001793 RID: 6035 RVA: 0x0032857D File Offset: 0x0032677D
		public void setVariableType(int vt)
		{
			this.variableType = vt;
		}

		// Token: 0x170004EB RID: 1259
		// (get) Token: 0x06001795 RID: 6037 RVA: 0x0032858F File Offset: 0x0032678F
		// (set) Token: 0x06001794 RID: 6036 RVA: 0x00328586 File Offset: 0x00326786
		public virtual TTableElementList TableTypeDefinitions
		{
			get
			{
				return this.tableTypeDefinitions;
			}
			set
			{
				this.tableTypeDefinitions = value;
			}
		}

		// Token: 0x170004EC RID: 1260
		// (get) Token: 0x06001797 RID: 6039 RVA: 0x003285A0 File Offset: 0x003267A0
		// (set) Token: 0x06001796 RID: 6038 RVA: 0x00328597 File Offset: 0x00326797
		public virtual int VariableType
		{
			get
			{
				return this.variableType;
			}
			set
			{
				this.variableType = value;
			}
		}

		// Token: 0x170004ED RID: 1261
		// (get) Token: 0x06001799 RID: 6041 RVA: 0x003285B1 File Offset: 0x003267B1
		// (set) Token: 0x06001798 RID: 6040 RVA: 0x003285A8 File Offset: 0x003267A8
		public virtual TExpression DefaultValue
		{
			get
			{
				return this.defaultValue;
			}
			set
			{
				this.defaultValue = value;
			}
		}

		// Token: 0x170004EE RID: 1262
		// (get) Token: 0x0600179A RID: 6042 RVA: 0x003285B9 File Offset: 0x003267B9
		// (set) Token: 0x0600179B RID: 6043 RVA: 0x003285C1 File Offset: 0x003267C1
		public virtual TTypeName Datatype
		{
			get
			{
				return this.datatype;
			}
			set
			{
				this.datatype = value;
			}
		}

		// Token: 0x170004EF RID: 1263
		// (get) Token: 0x0600179C RID: 6044 RVA: 0x003285CA File Offset: 0x003267CA
		// (set) Token: 0x0600179D RID: 6045 RVA: 0x003285D2 File Offset: 0x003267D2
		public virtual TObjectName VariableName
		{
			get
			{
				return this.variableName;
			}
			set
			{
				this.variableName = value;
			}
		}

		// Token: 0x0600179E RID: 6046 RVA: 0x003285DB File Offset: 0x003267DB
		public override void init(object arg1)
		{
			this.variableName = (TObjectName)arg1;
		}

		// Token: 0x0600179F RID: 6047 RVA: 0x003285EC File Offset: 0x003267EC
		public override void init(object arg1, object arg2)
		{
			this.init(arg1);
			if (arg2 == null)
			{
				this.variableType = 3;
				return;
			}
			if (((TTypeName)arg2).ToString().Equals("cursor", StringComparison.CurrentCultureIgnoreCase))
			{
				this.variableType = 2;
				return;
			}
			this.variableType = 1;
			this.datatype = (TTypeName)arg2;
		}

		// Token: 0x060017A0 RID: 6048 RVA: 0x0032863E File Offset: 0x0032683E
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x060017A1 RID: 6049 RVA: 0x0032864E File Offset: 0x0032684E
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x04001819 RID: 6169
		private TObjectName variableName;

		// Token: 0x0400181A RID: 6170
		private int variableType = 1;

		// Token: 0x0400181B RID: 6171
		private TTypeName datatype;

		// Token: 0x0400181C RID: 6172
		private TExpression defaultValue;

		// Token: 0x0400181D RID: 6173
		private TTableElementList tableTypeDefinitions;
	}
}
